#pragma once
#include "shapebuilder.h"

#define CIRCLE_CP_GUID _T("D5712AC1-4F2E-4769-A9CA-AB1F6F777991")

class TFunction_Logbook;
class CCircleInfo : public CShapeInfo
{
public:
	CCircleInfo();
	~CCircleInfo();
	virtual void Reset(void);

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
//----------------------------------
	gp_Pnt	ptCenter;
	gp_Dir  dirNormal;
	Standard_Real dRadius;
//-----------------------------------
	enum PARAM_INDEX_ROUND
	{
		IDX_START,

		CENTER_POINT	= 1,
			CENTER_X	= CENTER_POINT,
			CENTER_Y,
			CENTER_Z,
		RADIUS = 4,
		DIRECTION = 5,
			DIR_X = DIRECTION,
			DIR_Y,
			DIR_Z,
		IDX_END
	};
};

//////////////////////////////////////////////////////////////////////////

class CCircleBuilder :
	public CShapeBuilder
{
public:
	CCircleBuilder(void);
	~CCircleBuilder(void);

	bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	bool Build(CCircleInfo* pShapeInfo, TopoDS_Shape& shape);
};
